/**
  ******************************************************************************
  * @file    app_rtc.h
  * @author  Feirui_Joe
  * @version V0.1
  * @date    07/26/2010
  * @brief   Clock handling
  ******************************************************************************
  * @copy
  *
  * <h2><center>&copy; COPYRIGHT 2010 Feirui</center></h2>
  */ 



/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef  __APP_RTC_H__
#define  __APP_RTC_H__


#ifdef __cplusplus
 extern "C" {
#endif


/**
  * @brief GLOBALS RAM definition
  */
#ifdef   APP_RTC_GLOBALS
#define  APP_RTC_EXT
#else
#define  APP_RTC_EXT  extern
#endif

#define DateYearDefaultVal                1970


APP_RTC_EXT void RTC_Initial(void);
APP_RTC_EXT void Time_Adjust(uint32_t Val);
APP_RTC_EXT void UpdateRTCClockCount(void);

APP_RTC_EXT void TransferDateClockFormatToShow(uint8_t *TempClock,uint32_t TimeVar);
APP_RTC_EXT uint32_t TransferDateClockFormatToVal(uint8_t *TempClock);

APP_RTC_EXT uint8_t ClockCheckIfLeap(uint16_t year);
APP_RTC_EXT const uint8_t MonthDayNumberTbl[];

#ifdef __cplusplus
}
#endif


#endif   /*  __APP_RTC_H__  */

/******************* (C) COPYRIGHT 2010 Feirui *****END OF FILE****/